package mapStruct.mapper;

import mapStruct.dto.UpdateEstimateDTO;
import mapStruct.entity.TimeSheetEstimate;
import mapStruct.vo.TimeSheetEstimateVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper
public interface EstimateMapper {
    //target 为目标对象
    EstimateMapper INSTANCE = Mappers.getMapper(EstimateMapper.class);

    @Mappings({
            @Mapping(source = "id",target = "id"),
            @Mapping(source = "projectId",target = "projectId"),
            @Mapping(source = "deptId",target = "deptId"),
            @Mapping(source = "remark",target = "remark"),
            @Mapping(source = "version",target = "version"),
    })
    TimeSheetEstimate dtoToTimeSheetEstimate(UpdateEstimateDTO updateEstimateDTO);
}
